package commands.gameCommand
{
	import Iterator.ArrayIterator;
	import Iterator.IIterator;

	public class GamePlayers
	{
		private var _data:Array;
		private static var _instance:GamePlayers;
		private static const COLORS:Array = [0xffcccc,0xccffcc,0xccccff,0xffffcc,0xccfffff,0xffccff];
		public function GamePlayers(parameter:SingletoEnforce)
		{
			_data = new Array;
		}
		public static function getInstance():GamePlayers{
			if(_instance == null){
				_instance = new GamePlayers(new SingletoEnforce);
			}
			return _instance;
		}
		public function addGamePlayer(gamePlayer:GamePlayer):void{
			gamePlayer.color = COLORS[_data.length];
			_data.push(gamePlayer);
		}
		public function iterator():IIterator{
			return new ArrayIterator(_data);
		}
	}
}
class SingletoEnforce{}